<?php

/**
 * Description of specialDateSetCountAction
\* www.teuker.nl - mail@teuker.nl
 * 
 * @author francisc
 */

class specialDateSetCountAction extends sfAction {

    public function execute($request) {
        Util::loadI18NHelper();
        
        $count = $request->getParameter('count');

        if (!is_numeric($count))
            return __('Invalid');

            SqlEngineCore::get()->update(array('table' => 'settings',
                                               'columns' => array(
                                                   'special_dates_no' => array('value' => $count, 'type' => PDO::PARAM_INT)),
                                               'where' => array(
                                                   'restaurant_id' => array('value' => 1, 'type' => PDO::PARAM_INT))));

        return sfView::NONE;
    }
}
